package com.prs.crm.service.oa.impl;

import java.io.File;

import com.prs.crm.context.FileUtil;
import com.prs.crm.dao.oa.JobPlanAssessDao;
import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.oa.JobPlanAssess;
import com.prs.crm.service.impl.BaseServiceImpl;
import com.prs.crm.service.oa.JobPlanAssessService;

public class JobPlanAssessServiceImpl extends BaseServiceImpl<JobPlanAssess,JobPlanAssessDao> implements JobPlanAssessService{

	@Override
	public void submitJobPlanAssess(JobPlanAssess jobPlanAssess, File file,
			String fileName) {
		// TODO Auto-generated method stub
		Attachment attach = FileUtil.getInstance().createAttach(file, fileName);
		if(attach != null) {
			jobPlanAssess.setAttach(attach);
		}
		this.getDao().save(jobPlanAssess);
	}

}
